//  Copyright © 2014 Allen County Public Library.

//        ACPL Mobile is free software: This program is distributed and you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  ACPL Mobile is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, including without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ACPL Mobile. If not, see http://www.gnu.org/licenses/.

package us.in.lib.acpl.Mobile_ACPL.models;

import java.io.Serializable;
import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown=true)
public class OverdriveCheckoutsResponse {

	public Integer totalItems;
	public Integer totalCheckouts;
	public Integer expires_in;
	public List<OverdriveCheckout> checkouts;
	
	@JsonIgnoreProperties(ignoreUnknown=true)
	public static class OverdriveCheckout {
		public String reserveId;
		public String expires;
		public String isFormatLockedIn;
		public List<OverdriveCheckoutFormat> formats;
		public OverdriveCheckoutLinks links;
		public OverdriveCheckoutActions actions;
		
		@JsonIgnoreProperties(ignoreUnknown=true)
		public static class OverdriveCheckoutFormat{
			public String formatType;
			public OverdriveCheckoutFormatLinkTemplates linkTemplates;
			
			@JsonIgnoreProperties(ignoreUnknown=true)
			public static class OverdriveCheckoutFormatLinkTemplates{
				public OverdriveCheckoutFormatLinkTemplatesDownloadLink downloadLink;
				
				@JsonIgnoreProperties(ignoreUnknown=true)
				public static class OverdriveCheckoutFormatLinkTemplatesDownloadLink{
					public String href;
				}
			}
		}
		
		@JsonIgnoreProperties(ignoreUnknown=true)
		public static class OverdriveCheckoutLinks{
			public OverdriveCheckoutLinksMetadata metadata;
			
			@JsonIgnoreProperties(ignoreUnknown=true)
			public static class OverdriveCheckoutLinksMetadata{
				public String href;
			}
		}
		
		@JsonIgnoreProperties(ignoreUnknown=true)
		public static class OverdriveCheckoutActions{
			public OverdriveCheckoutActionsEarlyReturn earlyReturn;
			
			@JsonIgnoreProperties(ignoreUnknown=true)
			public static class OverdriveCheckoutActionsEarlyReturn{
				public String href;
				public String method;
			}
		}
	}
}
